package com.qianfeng.openapi.web.master.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

public class AdminUser {
    private Integer id;

    @JsonIgnore
    @NotBlank(message = "密码为必传项，岂能为空！")
    private String password;

    @NotBlank(message = "邮箱为必传项，岂能为空！")
    private String email;

    @JsonIgnore
    private String salt;

    @NotBlank(message = "真实姓名为必传项，岂能为空！")
    private String realName;

    @NotNull(message = "用户状态为必传项，岂能为空！")
    private Short status;

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName == null ? null : realName.trim();
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }
}